/**
 * 
 */
package com.omega.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

@Entity
@Table(name = "RMS_ITEM")

public class Item extends AbstractEntity implements Serializable {

	private static final long serialVersionUID = 2187090408756348981L;

	@Id
	@Column(name="ITEM_ID")
	@TableGenerator(table = "PORTAL_TABLE_GENERATOR", name = "TABLE_SEQ_GENERATOR", pkColumnValue = "ITEM_ID",allocationSize = 1, initialValue = 2)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_SEQ_GENERATOR")
	private long itemId; 	
	
	@Column(name = "ITEM_NAME", nullable = true, length = 100)
	private String itemName;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "BRAND_ID", nullable = false)
	private Brand brand;
	

	/**
	 * @return the itemId
	 */
	public long getitemId() {
		return itemId;
	}

	/**
	 * @param itemId the itemId to set
	 */
	public void setitemId(long itemId) {
		this.itemId = itemId;
	}

	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	/**
	 * @return the brand
	 */
	public Brand getBrand() {
		return brand;
	}

	/**
	 * @param brand the brand to set
	 */
	public void setBrand(Brand brand) {
		this.brand = brand;
	}


}
